package com.zofer.study.strategy.ifelse;

/**
 * @description 解决ifelse
 * 如果金额大于1000,就打5折,
 * 如果金额小于等于1000而且大于500,就打7折
 * 如果金额小于等于500而且大于0,就打9折
 * @date: 2020/10/22 15:55
 */
public class Main {

    public static void main(String[] args) {
        DiscountHandlerFactory factory = new DiscountHandlerFactory();
        double afterDiscount = factory.handlerDiscount(1100);
        System.out.println("打折后的价格："+afterDiscount);
    }
}
